#pragma once

#include <linux/compiler.h>
#include <linux/threads.h>
#include <linux/percpu-defs.h>
#include <linux/preempt.h>
#include <linux/smp.h>
#include <asm/processor.h>

#ifndef PER_CPU_BASE_SECTION
#ifdef CONFIG_SMP
#define PER_CPU_BASE_SECTION ".data.percpu"
#else
#define PER_CPU_BASE_SECTION ".data"
#endif
#endif

#define per_cpu(var, cpu) (*per_cpu_ptr(&(var), cpu))
